package org.yejiali.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.yejiali.common.response.ResponseResult;
import org.yejiali.service.UploadService;

/**
 * @Author:yejiali
 * @Date:2025/3/3-03-03-15:08
 * @Decsription:org.yejiali.controller
 * @Version:1.0
 */
@RestController
@RequestMapping("/upload")
public class UploadController {
    @Autowired
    private UploadService uploadService;

    @PostMapping
    public ResponseResult upload(MultipartFile img)
    { //MultipartFile是springboot提供的文件上传类
        return  uploadService.upload(img);
    }


}
